/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
/**
 *
 * @author Administrator
 */
public class XoayNgang {
    public static void Xoay(PixelAnh pix) {
        Pixel[][] data = pix.getData();

        for (int dong = 0; dong < pix.getHeight(); dong++) 
        {
            for (int cot = 0; cot < pix.getWidth() / 2; cot++) {
                Pixel temp = data[dong][cot];
                data[dong][cot] = data[dong][pix.getWidth() - cot - 1];
                data[dong][pix.getWidth() - cot - 1] = temp;
            }
        }

        pix.setData(data);
    }
    
}
